package com.stox.ui.javafx.core.widget.wrapper;

import javafx.scene.input.KeyCombination;

import org.springframework.core.Ordered;
import org.springframework.util.StringUtils;

public abstract class MenuItem extends javafx.scene.control.MenuItem implements Ordered{

	public MenuItem(String name, String accelarator, String iconPath) {
		if(StringUtils.hasText(name)) 			super.setText(name);
		if(StringUtils.hasText(accelarator)) 	super.setAccelerator(KeyCombination.keyCombination(accelarator));
		if(StringUtils.hasText(iconPath)) 	super.setGraphic(new ImageView(iconPath));
	}
	
	public abstract Class<?> getParentClass();
	
}
